<template>
  <div class="coachPage">
    <div class="title">专属教练任性约</div>
    
    <div class="block" v-for="(item,index) in sportData" :key="index">
      <div class="ul-item">
        <img :src="item.img" alt />
        <p class="name">{{item.name}}</p>
        <p class="info">{{item.info}}</p>
      </div>
      <span class="bind">预约</span>
    </div>
    <div class="marginbottom"></div>
  </div>
</template>

<script>
export default {
    data() {
        return {
            sportData: []
        };
    },
    components: {},
    mounted() {
        this.api.GetCoach().then(res => {
        if (res.data.success) {
            this.sportData = res.data.sportData;
        }
        });
    }
};
</script>

<style lang="less" scoped>
.coachPage {
  width: 100%;
  height: 100%;
  background: #eee;
  .title {
    height: 0.6rem;
    padding: 0.2rem 0;
    text-align: center;
    background: #fff;
    border-bottom: 1px solid #ddd;
  }
  .marginbottom{
      height: 1rem;
  }
}
.block {
  margin-bottom: 0.2rem;
  background: #fff;
  position: relative;
  .bind {
    position: absolute;
    right: 0.2rem;
    top: 0.2rem;
    background: rgb(245, 217, 6);
    font-size: 0.32rem;
    display: block;
    width: 1.2rem;
    text-align: center;
    height: 0.6rem;
    line-height: 0.6rem;
    padding: 0 0.2rem;
    border-radius: 0.3rem;
  }
}
.ul-item {
  width: 100%;
  height: 1.5rem;
  line-height: 1.5rem;
  text-align: left;
  padding-left: 0.2rem;
  font-size: 0.4rem;
  box-sizing: border-box;
  border-bottom: 1px solid #ddd;
  img {
    width: 1rem;
    border-radius: 0.5rem;
    float: left;
    margin-top: 0.2rem;
    margin-right: 0.2rem;
  }
  .name{
      height: 0.8rem;
      line-height: 1rem;

  }
  .info{
      height: 0.7rem;
      line-height: 0.5rem;
      font-size: 0.32rem;
      color: #666;
  }
  
}
</style>